package com.jz.pay3.config;

import com.jz.pay3.bo.CommonCacheBO;
import org.springframework.boot.CommandLineRunner;
import org.springframework.core.annotation.Order;
import org.springframework.stereotype.Component;

import javax.annotation.Resource;

@Order(1)
@Component
public class StartupRunner implements CommandLineRunner {

    @Resource
    CommonCacheBO commonCacheBO;

    @Override
    public void run(String... args) throws Exception {
        System.out.println("服务器启动成功");

        System.out.println("启动完成后将热点数据存放redis");
        System.out.println("=============================");
        commonCacheBO.cachePayment();
        commonCacheBO.getCachePayment();
//        commonCacheBO.delCachePayment();
        System.out.println("=============================");
    }
}
